do language plpgsql
$$
    declare
        nsp name;
        rel name;
        val int8;
    begin
        for nsp,rel in select nspname, relname
                       from pg_class t2,
                            pg_namespace t3
                       where t2.relnamespace = t3.oid
                         and t2.relkind = 'S'
            loop
                execute format($_$select last_value from %I.%I$_$, nsp, rel) into val;
                raise notice '%',
                    format($_$select setval('%I.%I'::regclass, %s);$_$, nsp, rel, div(val, 100000) * 100000 + 200000);
            end loop;
    end;
$$;

select currval('boss.bsvc_order_income_period_id_seq '::regclass);
select div(12312345, 100000) * 100000 + 100000;